const express = require('express')
const router = express.Router()
const { findBannerService, updateBannerService } = require('../service/bannerService')

// 获取首页标题接口
router.get('/', async(req, res, next) => {
    const data = await findBannerService()
    res.send(data)
})

// 修改首页标题接口
router.post('/', async(req, res, next) => {
    const result = await updateBannerService(req.body)
    res.send(result)
})

module.exports = router